package test8;

public class Demo2 {
    void play() {
        System.out.println(111);
    }

    @Override
    protected void finalize() {
        System.out.println("clean");
    }

    public static void main(String[] args) {
        Demo2 d1 = new Demo2();
        d1.play();
        System.gc();
        Demo2 d2 = new Demo2();
        d2.play();
    }
}
